
lma = lm('ListOut ~ ListFavor',
         data = A[which(A$ListTreat != 2),])
lmb = lm('ListOut ~ ListFavor*Age + ListFavor*Male + ListFavor*AssetSum + 
         ListFavor*C.C50_Years.Of.Schooling. + ListFavor*C.C14_Permanent.Residence.of.Jaipur. +
         ListFavor*factor(C.C8_Caste) + ListFavor*factor(C.C10_Mother.Tongue.) + ListFavor*factor(C.C6_Religion)',
         data = A[which(A$ListTreat != 2),])

OutBasicFavors = coeftest(lma, cluster.vcov(lma, A[which(A$ListTreat != 2),'A.A7_Area.Neighborhood'] ) )#
rownames(OutBasicFavors)[2] = 'Treatment'
OutBasicCtrl = coeftest(lmb, cluster.vcov(lmb, A[which(A$ListTreat != 2),'A.A7_Area.Neighborhood'] ) )#
rm(lma, lmb)

out = stargazer(OutBasicFavors, keep = c('^Treatment$'),
          covariate.labels = c('Treatment'),
          dep.var.caption = c(""),
          column.labels = c("Individual Clientelism"),
          header = F,
          label = 'Table:BasicResults',
          add.lines = list( c("N", sum(A$ListTreat == 1) + sum(A$ListTreat == 3) ) ) ,
          title = 'List experiment: Basic results')
writeLines(out,con = '../results/T3.tex'); rm(out) 

rm(OutBasicFavors, OutBasicCtrl)

